<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        ul li {
            float: left;
            width: 130px;
            height: 35px;
            list-style: none;
            transition: all 1s;
            perspective: 500px;
            margin: 0 5px;
        }

        .box {
            position: relative;
            width: 100%;
            height: 100%;
            transform-style: preserve-3d;
            transition: all 1s;
        }

        .box:hover {
            transform: rotateX(90deg);
        }

        .box1,
        .box2 {
            position: absolute;
            width: 100%;
            height: 100%;
            text-align: center;
            line-height: 35px;
            color: #fff;

        }

        .box .box1 {
            background-color: pink;
            transform: translateZ(17.5px);
        }

        .box .box2 {
            background-color: skyblue;
            transform: translateY(17.5px) rotateX(-90deg);
        }
    </style>
</head>

<body>
    <ul>
        <li>
            <div class="box">
                <div class="box1">前端55期</div>
                <div class="box2">黑马程序员</div>
            </div>
        </li>
        <li>
            <div class="box">
                <div class="box1">前端55期</div>
                <div class="box2">黑马程序员</div>
            </div>
        </li>
        <li>
            <div class="box">
                <div class="box1">前端55期</div>
                <div class="box2">黑马程序员</div>
            </div>
        </li>
        <li>
            <div class="box">
                <div class="box1">前端55期</div>
                <div class="box2">黑马程序员</div>
            </div>
        </li>
        <li>
            <div class="box">
                <div class="box1">前端55期</div>
                <div class="box2">黑马程序员</div>
            </div>
        </li>
    </ul>
</body>

</html>